﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        if (!!keyValue) {
            $.ajax({
                url: "/MiniSite/Settings/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    });
    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        $.submitForm({
            url: "/MiniSite/Settings/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
            }
        })
    }
</script>

<form id="form1">
    <div style="padding-top: 20px; margin-right: 20px;">
        <table class="form">
            <tr>
                <th class="formTitle">场地名称</th>
                <td class="formValue">
                    <input id="F_SiteName" name="F_SiteName" type="text" class="form-control required" placeholder="请录入场地名称" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">场地图片地址</th>
                <td class="formValue">
                    <input id="F_SiteImageSrc" name="F_SiteImageSrc" type="text" class="form-control required" placeholder="请录入场地图片地址" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">活动名称</th>
                <td class="formValue">
                    <input id="F_ActivityName" name="F_ActivityName" type="text" class="form-control required" placeholder="请录入活动名称" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">活动图片地址</th>
                <td class="formValue">
                    <input id="F_ActivityImageSrc" name="F_ActivityImageSrc" type="text" class="form-control required" placeholder="请录入活动图片地址" />
                </td>
            </tr>
            <tr>
                <tr>
                    <th class="formTitle" valign="top" style="padding-top: 5px;">服务条款
                    </th>
                    <td class="formValue" colspan="3">
                        <textarea id="F_Service" name="F_Service" class="form-control" style="height: 60px;" placeholder="请录入服务条款" ></textarea>
                    </td>
                </tr>
            </tr>
            <tr>
                <tr>
                    <th class="formTitle" valign="top" style="padding-top: 5px;">关于我们
                    </th>
                    <td class="formValue" colspan="3">
                        <textarea id="F_AboutMe" name="F_AboutMe" class="form-control" style="height: 60px;" placeholder="请录入关于我们" ></textarea>
                    </td>
                </tr>
            </tr>
            <tr>
                <th class="formTitle">版本号</th>
                <td class="formValue">
                    <input id="F_Version" name="F_Version" type="text" class="form-control required" placeholder="请录入版本号" />
                </td>
            </tr>
            <tr>
                <th class="formTitle">排序</th>
                <td class="formValue">
                    <input id="F_Sort" name="F_Sort" type="text" class="form-control required" placeholder="请录入排序" />
                </td>
            </tr>
        </table>
    </div>
</form>


